﻿// -------------------------------------------------------------------------
//    @FileName         :    NFAheadCostPart.cpp
//    @Author           :    gaoyi
//    @Date             :    2025/1/7
//    @Email            :    445267987@qq.com
//    @Module           :    NFAheadCostPart
//
// -------------------------------------------------------------------------

#include "NFAheadCostPart.h"

#include "proto_db.pb.h"

NFAheadCostPart::NFAheadCostPart()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFAheadCostPart::~NFAheadCostPart()
{
}

int NFAheadCostPart::CreateInit()
{
    return 0;
}
    
int NFAheadCostPart::ResumeInit()
{
    return 0;
}

int NFAheadCostPart::LoadFromDB(const proto_ff::tbRoleDetail* pDBData)
{
    m_stData.FromPb(pDBData->role_fortune_data().ahead_cost());
    return 0;
}

int NFAheadCostPart::InitConfig(proto_ff::tbRoleDetail* pDbData, const RoleOne& stRoleOne)
{
    pDbData->mutable_role_fortune_data()->mutable_ahead_cost();
    return 0;
}

int NFAheadCostPart::SaveDB(proto_ff::tbRoleDetail* pDBData)
{
    m_stData.ToPb(pDBData->mutable_role_fortune_data()->mutable_ahead_cost());
    return 0;
}

int NFAheadCostPart::MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp)
{
    return 0;
}

int NFAheadCostPart::MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo)
{
    return 0;
}
